home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / vbcc / pasm / version.c < prev   
C/C++ Source or Header  |  1998-06-24  |  3KB  |  81 lines

  1. /* $VER: pasm version.c V0.6 (30.10.97)
  2.  *
  3.  * This file is part of pasm, a portable PowerPC assembler.
  4.  * Copyright (c) 1997  Frank Wille
  5.  *
  6.  * pasm is freeware and part of the portable and retargetable ANSI C
  7.  * compiler vbcc, copyright (c) 1995-97 by Volker Barthelmann.
  8.  * pasm may be freely redistributed as long as no modifications are
  9.  * made and nothing is charged for it. Non-commercial usage is allowed
  10.  * without any restrictions.
  11.  * EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
  12.  * SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
  13.  *
  14.  *
  15.  * v0.6 (30.10.97) phx
  16.  *      Description for option -R was changed from "don't predefine
  17.  *      standard symbols" into "don't predefine register symbols".
  18.  *      Options to disable warnings for optional, 64-bit and super-
  19.  *      visor instructions: -mo, -m64, -ms.
  20.  * v0.5 (12.10.97) phx
  21.  *      New option -D to define a symbol.
  22.  * v0.4 (02.07.97) phx
  23.  *      -V prints only version and build string and no instructions. New
  24.  *      function show_version().
  25.  *      Base address for absolute code may be set with -B option.
  26.  *      New option -I to specify some include paths.
  27.  *      Option -x automatically declares unknown symbols as
  28.  *      externally defined.
  29.  * v0.3 (26.03.97) phx
  30.  *      New option -O to select output file format.
  31.  * v0.2 (25.03.97) phx
  32.  *      Writes ELF object for 32-bit PowerPC big-endian. Either absolute
  33.  *      or ELF output format may be selected. ELF is default for all
  34.  *      currently supported platforms. PPCasm supports nine different
  35.  *      relocation types (there are much more...).
  36.  *      Compiles and works also under NetBSD/amiga (68k).
  37.  *      Changed function declaration to 'new style' in all sources
  38.  *      (to avoid problems with '...' for example).
  39.  * v0.1 (11.03.97) phx
  40.  *      First test version with all PowerPC instructions and most
  41.  *      important directives. Only raw, absolute output.
  42.  * v0.0 (14.02.97) phx
  43.  *      File created. Project started.
  44.  */
  45.  
  46.  
  47. #define VERSION_C
  48. #include "ppcasm.h"
  49.  
  50.  
  51. void show_version(void)
  52. {
  53.   printf(PNAME " V%d.%02d (" MACHINE ")  (c)1997 by Frank Wille\n"
  54.          "build date: " __DATE__ ", " __TIME__ "\n\n"
  55.          ,VERSION,REVISION);
  56. }
  57.  
  58.  
  59. void show_usage(void)
  60. {
  61.   show_version();
  62.  
  63.   printf("usage: " PNAME " [?][-V][-o <file>][-I <path>][-D <sym>[=<exp>]]"
  64.          "[-w][-x][-R][-X][-O <n>][-B <addr>][-m64|s|o] <file>\n"
  65.          "<file>           PowerPC source text to assemble.\n"
  66.          "-V               print version identification and build string.\n"
  67.          "-o <file>        output file name.\n"
  68.          "-I <path>        add include path.\n"
  69.          "-D <sym>[=<exp>] define a symbol.\n"
  70.          "-w               suppress warnings.\n"
  71.          "-x               undefined symbols are automatically external.\n"
  72.          "-R               don't predefine register symbols.\n"
  73.          "-X               no extended mnemonics.\n"
  74.          "-O <n>           set output format (0=abs, 1=elf, 2=ehf).\n"
  75.          "-B <address>     base address for absolute output.\n"
  76.          "-m64             enable 64-bit instructions.\n"
  77.          "-ms              enable supervisor instructions.\n"
  78.          "-mo              enable optional instructions.\n"
  79.          );
  80. }
  81.